	$(function(){
		initXxgg();
	})	
	
	var data = {"data":[{"jtzs":"5.626","x":"108.824078","dlmc":"G211|长安区|0","rank":1,"y":"34.119359"},{"jtzs":"4.7","x":"108.82866","dlmc":"G211|长安区|0","rank":2,"y":"34.057756"},{"jtzs":"1.911","x":"108.623044","dlmc":"G344|鄠邑区|3","rank":3,"y":"34.139906"},{"jtzs":"1.827","x":"108.827656","dlmc":"G211|长安区|1","rank":4,"y":"34.056841"},{"jtzs":"1.591","x":"108.695769","dlmc":"G211|长安区|2","rank":5,"y":"34.1135"},{"jtzs":"1.585","x":"108.629386","dlmc":"G344|鄠邑区|3","rank":6,"y":"34.163702"},{"jtzs":"1.532","x":"108.724678","dlmc":"G344|长安区|0","rank":7,"y":"34.014424"},{"jtzs":"1.479","x":"108.785598","dlmc":"G211|长安区|2","rank":8,"y":"34.127247"},{"jtzs":"1.42","x":"109.342864","dlmc":"S101|蓝田县|1","rank":9,"y":"34.145936"},{"jtzs":"1.387","x":"108.785598","dlmc":"G211|长安区|2","rank":10,"y":"34.127247"}],"success":"true"}
	function initXxgg(){
		
			var html = "";
			var colorcls = "";
			let level = 1;
			data = data.data;
			for(let i=0;i<10;i++){
				let rate = data[i].jtzs*100;
			    if(i==1) colorcls = 'color90';
			    else if(i==2) colorcls = 'color80';
			    else if(i==3) colorcls = 'color70';
			    else if(i==4) colorcls = 'color60';
			    else if(i>=5) colorcls = 'color50';
			    let tip = (rate/100).toFixed(2)
			    html += `<li class='${colorcls}' style='background-size:${rate*0.2}% 100%'>
			    	<div class='rs-order'>${i+1}<span class='btm-line'></span></div>
			    	<div class='rs-name'><span class='name'>${data[i].dlmc}</span><span class='tip'><label class='tip'>${tip}</label><label class='unit'></label></span></div><div class='locate'  onclick='locateAndShowDetail("${data[i].x}","${data[i].y}")'></div>
			    	</li>`;
			}
			$("#cityRank-1").html(html);
			
			$('.rs-scroll').scroll({
		        speed: 70, //数值越大，速度越慢
		        rowHeight: 74 //li的高度
		    });
		
	}
	
